<CodeTemplates version="3.0">
	
	<CodeTemplate version="2.0">
		<Header>
			<_Group>C#</_Group>
			<Version>1.0</Version>
			<MimeType>text/x-csharp</MimeType>
			<Shortcut>~</Shortcut>
			<_Description>Template for destructor</_Description>
			<TemplateType>Expansion</TemplateType>
		</Header>
		<Variables>
			<Variable name="classname" isEditable="false">
				<_ToolTip>Class name</_ToolTip>
				<Function>GetCurrentClassName()</Function>
			</Variable>
		</Variables>
		<Code><![CDATA[~$classname$ ()
{
	$end$
}]]></Code>
	</CodeTemplate>

	<CodeTemplate version="2.0">
		<Header>
			<_Group>C#</_Group>
			<Version>1.0</Version>
			<MimeType>text/x-csharp</MimeType>
			<Shortcut>Attribute</Shortcut>
			<_Description>Template for an attribute.</_Description>
			<TemplateType>Expansion</TemplateType>
		</Header>
		<Variables>
			<Variable name="name" isIdentifier="true">
				<Default>My</Default>
				<_ToolTip>The name of the attribute</_ToolTip>
			</Variable>
			<Variable name="target">
				<Default>All</Default>
				<Values>
					<Value icon="md-field">Assembly</Value>
					<Value icon="md-field">Module</Value>
					<Value icon="md-field">Class</Value>
					<Value icon="md-field">Struct</Value>
					<Value icon="md-field">Enum</Value>
					<Value icon="md-field">Constructor</Value>
					<Value icon="md-field">Method</Value>
					<Value icon="md-field">Property</Value>
					<Value icon="md-field">Field</Value>
					<Value icon="md-field">Event</Value>
					<Value icon="md-field">Interface</Value>
					<Value icon="md-field">Parameter</Value>
					<Value icon="md-field">Delegate</Value>
					<Value icon="md-field">ReturnValue</Value>
					<Value icon="md-field">GenericParameter</Value>
					<Value icon="md-field">All</Value>
				</Values>
			</Variable>
			<Variable name="inherited">
				<Default>false</Default>
				<Values>
					<Value icon="md-keyword">true</Value>
					<Value icon="md-keyword">false</Value>
				</Values>
			</Variable>
			<Variable name="allowmultiple">
				<Default>true</Default>
				<Values>
					<Value icon="md-keyword">true</Value>
					<Value icon="md-keyword">false</Value>
				</Values>
			</Variable>
			<Variable name="SystemAttribute" isEditable="false">
				<Default>System.Attribute</Default>
				<Function>GetSimpleTypeName("System#Attribute")</Function>
			</Variable>
			<Variable name="SystemAttributeUsage" isEditable="false">
				<Default>System.AttributeUsage</Default>
				<Function>GetSimpleTypeName("System#AttributeUsage")</Function>
			</Variable>
			<Variable name="SystemAttributeTargets" isEditable="false">
				<Default>System.AttributeTargets</Default>
				<Function>GetSimpleTypeName("System#AttributeTargets")</Function>
			</Variable>
			<Variable name="SystemNotImplementedException" isEditable="false">
				<Default>System.NotImplementedException</Default>
				<Function>GetSimpleTypeName("System#NotImplementedException")</Function>
			</Variable>
		</Variables>
		<Code><![CDATA[[$SystemAttributeUsage$ ($SystemAttributeTargets$.$target$, Inherited = $inherited$, AllowMultiple = $allowmultiple$)]
public sealed class $name$Attribute : $SystemAttribute$
{
	readonly string positionalString;
	public string PositionalString {
		get {
			return positionalString;
		}
	}
	
	public int NamedInt { get; set; }
	
	public $name$Attribute (string positionalString)
	{
		this.positionalString = positionalString;
		
		// TODO: Implement code here
		$end$throw new $SystemNotImplementedException$ ();
	}
}]]></Code>
	</CodeTemplate>

	<CodeTemplate version="2.0">
		<Header>
			<_Group>C#</_Group>
			<Version>1.0</Version>
			<MimeType>text/x-csharp</MimeType>
			<Shortcut>ctor</Shortcut>
			<_Description>Template for constructor</_Description>
			<TemplateType>Expansion</TemplateType>
		</Header>
		<Variables>
			<Variable name="classname" isEditable="false">
				<_ToolTip>Class name</_ToolTip>
				<Function>GetCurrentClassName()</Function>
			</Variable>
			<Variable name="modifier" isEditable="false">
				<Function>GetConstructorModifier()</Function>
			</Variable>
		</Variables>
		<Code><![CDATA[$modifier$$classname$ ()
{
	$end$
}]]></Code>
	</CodeTemplate>

	<CodeTemplate version="2.0">
		<Header>
			<_Group>C#</_Group>
			<Version>1.0</Version>
			<MimeType>text/x-csharp</MimeType>
			<Shortcut>cw</Shortcut>
			<_Description>Template for Console.WriteLine</_Description>
			<TemplateType>Expansion</TemplateType>
		</Header>
		<Variables>
			<Variable name="SystemConsoleWriteLine" isEditable="false">
				<Default>System.Console.WriteLine</Default>
				<Function>GetSimpleTypeName("System#Console.WriteLine")</Function>
			</Variable>
		</Variables>
		<Code><![CDATA[$SystemConsoleWriteLine$ ($end$);]]></Code>
	</CodeTemplate>

	<CodeTemplate version="2.0">
		<Header>
			<_Group>C#</_Group>
			<Version>1.0</Version>
			<MimeType>text/x-csharp</MimeType>
			<Shortcut>switch</Shortcut>
			<_Description>Template for switch statement</_Description>
			<TemplateType>Expansion</TemplateType>
		</Header>
		<Variables>
			<Variable name="expression">
				<Default>switch_on</Default>
				<_ToolTip>Expression to switch on</_ToolTip>
			</Variable>
		</Variables>
		<Code><![CDATA[switch ($expression$) {
default:
break;
}$end$]]></Code>
	</CodeTemplate>
	
	<CodeTemplate version="2.0">
		<Header>
			<_Group>C#</_Group>
			<Version>1.0</Version>
			<MimeType>text/x-csharp</MimeType>
			<Shortcut>svm</Shortcut>
			<_Description>Template for void Main method.</_Description>
			<TemplateType>Expansion</TemplateType>
		</Header>
		<Code><![CDATA[public static void Main (string[] args)
{
	$end$
}]]></Code>

	</CodeTemplate>
	
	<CodeTemplate version="2.0">
		<Header>
			<_Group>C#</_Group>
			<Version>1.0</Version>
			<MimeType>text/x-csharp</MimeType>
			<Shortcut>sim</Shortcut>
			<_Description>Template for int Main method.</_Description>
			<TemplateType>Expansion</TemplateType>
		</Header>
		<Code><![CDATA[public static int Main (string[] args)
{
	$end$
	return 0;
}]]></Code>
	</CodeTemplate>
	
	<CodeTemplate version="2.0">
		<Header>
			<_Group>C#</_Group>
			<Version>1.0</Version>
			<MimeType>text/x-csharp</MimeType>
			<Shortcut>Exception</Shortcut>
			<_Description>Template for exception</_Description>
			<TemplateType>Expansion</TemplateType>
		</Header>
		<Variables>
			<Variable name="name" isIdentifier="true">
				<Default>My</Default>
				<_ToolTip>ExceptionName</_ToolTip>
			</Variable>
			<Variable name="SystemException" isEditable="false">
				<Default>System.Exception</Default>
				<Function>GetSimpleTypeName("System#Exception")</Function>
			</Variable>
			<Variable name="SystemSerializable" isEditable="false">
				<Default>System.Serializable</Default>
				<Function>GetSimpleTypeName("System#Serializable")</Function>
			</Variable>
			<Variable name="SystemRuntimeSerializationSerializationInfo" isEditable="false">
				<Default>System.Runtime.Serialization.SerializationInfo</Default>
				<Function>GetSimpleTypeName("System.Runtime.Serialization#SerializationInfo")</Function>
			</Variable>
			<Variable name="SystemRuntimeSerializationStreamingContext" isEditable="false">
				<Default>System.Runtime.Serialization.StreamingContext</Default>
				<Function>GetSimpleTypeName("System.Runtime.Serialization#StreamingContext")</Function>
			</Variable>
		</Variables>
		<Code><![CDATA[
[$SystemSerializable$]
public class $name$Exception : $SystemException$
{
	/// <summary>
	/// Initializes a new instance of the <see cref="T:$name$Exception"/> class
	/// </summary>
	public $name$Exception ()
	{
	}
	
	/// <summary>
	/// Initializes a new instance of the <see cref="T:$name$Exception"/> class
	/// </summary>
	/// <param name="message">A <see cref="T:System.String"/> that describes the exception. </param>
	public $name$Exception (string message) : base (message)
	{
	}
	
	/// <summary>
	/// Initializes a new instance of the <see cref="T:$name$Exception"/> class
	/// </summary>
	/// <param name="message">A <see cref="T:System.String"/> that describes the exception. </param>
	/// <param name="inner">The exception that is the cause of the current exception. </param>
	public $name$Exception (string message, $SystemException$ inner) : base (message, inner)
	{
	}
	
	/// <summary>
	/// Initializes a new instance of the <see cref="T:$name$Exception"/> class
	/// </summary>
	/// <param name="context">The contextual information about the source or destination.</param>
	/// <param name="info">The object that holds the serialized object data.</param>
	protected $name$Exception ($SystemRuntimeSerializationSerializationInfo$ info, $SystemRuntimeSerializationStreamingContext$ context) : base (info, context)
	{
	}
}]]></Code>
	</CodeTemplate>
	
	<CodeTemplate version="2.0">
		<Header>
			<_Group>C#</_Group>
			<Version>1.0</Version>
			<MimeType>text/x-csharp</MimeType>
			<Shortcut>indexer</Shortcut>
			<_Description>Template for an indexer</_Description>
			<TemplateType>Expansion</TemplateType>
		</Header>
		<Variables>
			<Variable name="type" isIdentifier="true">
				<Default>object</Default>
				<_ToolTip>Return type of the indexer</_ToolTip>
			</Variable>
			<Variable name="indextype" isIdentifier="true">
				<Default>int</Default>
				<_ToolTip>Type to index with</_ToolTip>
			</Variable>
			<Variable name="SystemNotImplementedException" isEditable="false">
				<Default>System.NotImplementedException</Default>
				<Function>GetSimpleTypeName("System#NotImplementedException")</Function>
			</Variable>
		</Variables>
		<Code><![CDATA[public $type$ this [$indextype$ index] {
	get {
		$end$
	}
	set {
		throw new $SystemNotImplementedException$ ();
	}
}]]></Code>
	</CodeTemplate>
	
	<CodeTemplate version="2.0">
		<Header>
			<_Group>C#</_Group>
			<Version>1.0</Version>
			<MimeType>text/x-csharp</MimeType>
			<Shortcut>prop</Shortcut>
			<_Description>Template for a short property</_Description>
			<TemplateType>Expansion</TemplateType>
		</Header>
		<Variables>
			<Variable name="type" isIdentifier="true">
				<Default>object</Default>
				<_ToolTip>Return type of the indexer</_ToolTip>
			</Variable>
			<Variable name="name" isIdentifier="true">
				<Default>MyProperty</Default>
				<_ToolTip>Property name</_ToolTip>
			</Variable>
		</Variables>
		<Code><![CDATA[public $type$ $name$ { get; set; }]]></Code>
	</CodeTemplate>
	
	<CodeTemplate version="2.0">
		<Header>
			<_Group>C#</_Group>
			<Version>1.0</Version>
			<MimeType>text/x-csharp</MimeType>
			<Shortcut>propg</Shortcut>
			<_Description>Template for a short property with private set.</_Description>
			<TemplateType>Expansion</TemplateType>
		</Header>
		<Variables>
			<Variable name="type" isIdentifier="true">
				<Default>object</Default>
				<_ToolTip>Return type of the indexer</_ToolTip>
			</Variable>
			<Variable name="name" isIdentifier="true">
				<Default>MyProperty</Default>
				<_ToolTip>Property name</_ToolTip>
			</Variable>
		</Variables>
		<Code><![CDATA[public $type$ $name$  {
	get;
	private set;
}]]></Code>
	</CodeTemplate>
	
	<CodeTemplate version="2.0">
		<Header>
			<_Group>C#</_Group>
			<Version>1.0</Version>
			<MimeType>text/x-csharp</MimeType>
			<Shortcut>EventArgs</Shortcut>
			<_Description>Template for event arguments</_Description>
			<TemplateType>Expansion</TemplateType>
		</Header>
		<Variables>
			<Variable name="name" isIdentifier="true">
				<Default>My</Default>
				<_ToolTip>ExceptionName</_ToolTip>
			</Variable>
			<Variable name="SystemEventArgs" isEditable="false">
				<Default>System.EventArgs</Default>
				<Function>GetSimpleTypeName("System#EventArgs")</Function>
			</Variable>
			<Variable name="SystemSerializable" isEditable="false">
				<Default>System.Serializable</Default>
				<Function>GetSimpleTypeName("System#Serializable")</Function>
			</Variable>
		</Variables>
		<Code><![CDATA[[$SystemSerializable$]
public sealed class $name$EventArgs : $SystemEventArgs$
{
	public $name$EventArgs ()
	{
		$end$
	}
}]]></Code>
	</CodeTemplate>
	
	<CodeTemplate version="2.0">
		<Header>
			<_Group>C#</_Group>
			<Version>1.0</Version>
			<MimeType>text/x-csharp</MimeType>
			<Shortcut>mn</Shortcut>
			<_Description>Sets minimum value to a variable</_Description>
			<TemplateType>Expansion</TemplateType>
		</Header>
		<Variables>
			<Variable name="var" isIdentifier="true">
				<Default>var</Default>
				<_ToolTip>Variable name</_ToolTip>
			</Variable>
			<Variable name="SystemMin" isEditable="false">
				<Default>System.Min</Default>
				<Function>GetSimpleTypeName("System#Min")</Function>
			</Variable>
		</Variables>
		<Code><![CDATA[$var$ = $SystemMin$ ($var$, $end$);]]></Code>
	</CodeTemplate>
	
	<CodeTemplate version="2.0">
		<Header>
			<_Group>C#</_Group>
			<Version>1.0</Version>
			<MimeType>text/x-csharp</MimeType>
			<Shortcut>mx</Shortcut>
			<_Description>Sets maximum value to a variable</_Description>
			<TemplateType>Expansion</TemplateType>
		</Header>
		<Variables>
			<Variable name="var" isIdentifier="true">
				<Default>var</Default>
				<_ToolTip>Variable name</_ToolTip>
			</Variable>
			<Variable name="SystemMax" isEditable="false">
				<Default>System.Max</Default>
				<Function>GetSimpleTypeName("System#Max")</Function>
			</Variable>
		</Variables>
		<Code><![CDATA[$var$ = $SystemMax$ ($var$, $end$);]]></Code>
	</CodeTemplate>
	
	<CodeTemplate version="2.0">
		<Header>
			<_Group>C#</_Group>
			<Version>1.0</Version>
			<MimeType>text/x-csharp</MimeType>
			<Shortcut>lst</Shortcut>
			<_Description>Access last element of a collection</_Description>
			<TemplateType>Expansion</TemplateType>
		</Header>
		<Variables>
			<Variable name="col" isIdentifier="true">
				<Default>col</Default>
				<_ToolTip>Collection name</_ToolTip>
				<Function>GetCollections()</Function>
			</Variable>
			<Variable name="countorlength" isEditable="false">
				<Default>Count</Default>
				<Function>GetLengthProperty("col")</Function>
			</Variable>
		</Variables>
		<Code><![CDATA[$col$[$col$.$countorlength$ - 1]]]></Code>
	</CodeTemplate>
	
	
	<!-- Surround Templates -->
	<CodeTemplate version="2.0">
		<Header>
			<_Group>C#</_Group>
			<MimeType>text/x-csharp</MimeType>
			<Shortcut>#region</Shortcut>
			<_Description>Template for #region</_Description>
			<TemplateType>SurroundsWith,Expansion</TemplateType>
		</Header>
		<Variables>
			<Variable name="name">
				<Default>MyRegion</Default>
				<_ToolTip>Region name</_ToolTip>
			</Variable>
		</Variables>
		
		<Code><![CDATA[#region $name$
$selected$$end$
#endregion]]></Code>
	</CodeTemplate>
	
	<CodeTemplate version="2.0">
		<Header>
			<_Group>C#</_Group>
			<Version>1.0</Version>
			<MimeType>text/x-csharp</MimeType>
			<Shortcut>#if</Shortcut>
			<_Description>Template for #if</_Description>
			<TemplateType>SurroundsWith,Expansion</TemplateType>
		</Header>
		<Variables>
			<Variable name="expression" isIdentifier="true">
				<Default>true</Default>
				<_ToolTip>Preprocessor expression to evaluate</_ToolTip>
			</Variable>
		</Variables>
		
		<Code><![CDATA[#if $expression$
$selected$$end$
#endif]]></Code>
	</CodeTemplate>

	<CodeTemplate version="2.0">
		<Header>
			<_Group>C#</_Group>
			<Version>1.0</Version>
			<MimeType>text/x-csharp</MimeType>
			<Shortcut>checked</Shortcut>
			<_Description>Template checked block</_Description>
			<TemplateType>SurroundsWith,Expansion</TemplateType>
		</Header>
		<Code><![CDATA[checked
{
	$selected$$end$
}]]></Code>
	</CodeTemplate>
	
	<CodeTemplate version="2.0">
		<Header>
			<_Group>C#</_Group>
			<Version>1.0</Version>
			<MimeType>text/x-csharp</MimeType>
			<Shortcut>class</Shortcut>
			<_Description>Template for class declaration</_Description>
			<TemplateType>SurroundsWith,Expansion</TemplateType>
		</Header>
		<Variables>
			<Variable name="name" isIdentifier="true">
				<Default>MyClass</Default>
				<_ToolTip>Class name</_ToolTip>
			</Variable>
		</Variables>
		<Code><![CDATA[class $name$
{
	$selected$$end$
}]]></Code>
	</CodeTemplate>
	
	<CodeTemplate version="2.0">
		<Header>
			<_Group>C#</_Group>
			<Version>1.0</Version>
			<MimeType>text/x-csharp</MimeType>
			<Shortcut>interface</Shortcut>
			<_Description>Template for an Interface</_Description>
			<TemplateType>SurroundsWith,Expansion</TemplateType>
		</Header>
		<Variables>
			<Variable name="name" isIdentifier="true">
				<Default>IMyInterface</Default>
				<_ToolTip>Interface name</_ToolTip>
			</Variable>
		</Variables>
		<Code><![CDATA[interface $name$ 
{
	$selected$$end$
}]]></Code>
	</CodeTemplate>
	
	<CodeTemplate version="2.0">
		<Header>
			<_Group>C#</_Group>
			<Version>1.0</Version>
			<MimeType>text/x-csharp</MimeType>
			<Shortcut>struct</Shortcut>
			<_Description>Template for a Struct</_Description>
			<TemplateType>SurroundsWith,Expansion</TemplateType>
		</Header>
		<Variables>
			<Variable name="name" isIdentifier="true">
				<Default>MyStruct</Default>
				<_ToolTip>Struct name</_ToolTip>
			</Variable>
		</Variables>
		<Code><![CDATA[struct $name$ 
{
	$selected$$end$
}]]></Code>
	</CodeTemplate>
	
	<CodeTemplate version="2.0">
		<Header>
			<_Group>C#</_Group>
			<Version>1.0</Version>
			<MimeType>text/x-csharp</MimeType>
			<Shortcut>enum</Shortcut>
			<_Description>Template for an Enumeration</_Description>
			<TemplateType>SurroundsWith,Expansion</TemplateType>
		</Header>
		<Variables>
			<Variable name="name" isIdentifier="true">
				<Default>MyEnum</Default>
				<_ToolTip>Enumeration name</_ToolTip>
			</Variable>
		</Variables>
		<Code><![CDATA[enum $name$ 
{
	$selected$$end$
}]]></Code>
	</CodeTemplate>

	<CodeTemplate version="2.0">
		<Header>
			<_Group>C#</_Group>
			<Version>1.0</Version>
			<MimeType>text/x-csharp</MimeType>
			<Shortcut>for</Shortcut>
			<_Description>Template for 'for' loop</_Description>
			<TemplateType>SurroundsWith,Expansion</TemplateType>
		</Header>
		<Variables>
			<Variable name="i" isIdentifier="true">
				<Default>i</Default>
				<_ToolTip>Index</_ToolTip>
			</Variable>
			<Variable name="max">
				<Default>max</Default>
				<_ToolTip>Number of iterations</_ToolTip>
			</Variable>
		</Variables>
		<Code><![CDATA[for (int $i$ = 0; $i$ < $max$; $i$++) {
	$selected$$end$
}]]></Code>
	</CodeTemplate>
	
	<CodeTemplate version="2.0">
		<Header>
			<_Group>C#</_Group>
			<Version>1.0</Version>
			<MimeType>text/x-csharp</MimeType>
			<Shortcut>forr</Shortcut>
			<_Description>Template for reverse 'for' loop</_Description>
			<TemplateType>SurroundsWith,Expansion</TemplateType>
		</Header>
		<Variables>
			<Variable name="i" isIdentifier="true">
				<Default>i</Default>
				<_ToolTip>Index</_ToolTip>
			</Variable>
			<Variable name="max">
				<Default>max</Default>
				<_ToolTip>Number of iterations</_ToolTip>
			</Variable>
		</Variables>
		<Code><![CDATA[for (int $i$ = $max$ - 1; $i$ >= 0; $i$--) {
	$selected$$end$
}]]></Code>
	</CodeTemplate>

	<CodeTemplate version="2.0">
		<Header>
			<_Group>C#</_Group>
			<Version>1.0</Version>
			<MimeType>text/x-csharp</MimeType>
			<Shortcut>while</Shortcut>
			<_Description>Template for 'while' loop</_Description>
			<TemplateType>SurroundsWith,Expansion</TemplateType>
		</Header>
		<Variables>
			<Variable name="expression">
				<Default>true</Default>
				<_ToolTip>Expression to evaluate</_ToolTip>
			</Variable>
		</Variables>
		<Code><![CDATA[while ($expression$) {
	$selected$$end$
}]]></Code>
	</CodeTemplate>
	
	<CodeTemplate version="2.0">
		<Header>
			<_Group>C#</_Group>
			<Version>1.0</Version>
			<MimeType>text/x-csharp</MimeType>
			<Shortcut>itar</Shortcut>
			<_Description>Template for iterating through a collection</_Description>
			<TemplateType>SurroundsWith,Expansion</TemplateType>
		</Header>
		<Variables>
			<Variable name="i" isIdentifier="true">
				<Default>i</Default>
				<_ToolTip>Index</_ToolTip>
			</Variable>
			<Variable name="collection" isIdentifier="true">
				<Default>collection</Default>
				<_ToolTip>Collection to iterate through</_ToolTip>
				<Function>GetCollections()</Function>
			</Variable>
			<Variable name="varname" isIdentifier="true">
				<Default>varname</Default>
				<_ToolTip>Name of variable.</_ToolTip>
			</Variable>
			<Variable name="countorlength" isEditable="false">
				<Default>Count</Default>
				<Function>GetLengthProperty("collection")</Function>
			</Variable>
			<Variable name="type" isEditable="false">
				<Default>var</Default>
				<Function>GetComponentTypeOf("collection")</Function>
			</Variable>
		</Variables>
		<Code><![CDATA[for (int $i$ = 0; $i$ < $collection$.$countorlength$; $i$++) {
	$type$ $varname$ = $collection$[$i$];
	$selected$$end$
}]]></Code>
	</CodeTemplate>
	
	<CodeTemplate version="2.0">
		<Header>
			<_Group>C#</_Group>
			<Version>1.0</Version>
			<MimeType>text/x-csharp</MimeType>
			<Shortcut>itarr</Shortcut>
			<_Description>Template for iterating reverse through a collection</_Description>
			<TemplateType>SurroundsWith,Expansion</TemplateType>
		</Header>
		<Variables>
			<Variable name="i" isIdentifier="true">
				<Default>i</Default>
				<_ToolTip>Index</_ToolTip>
			</Variable>
			<Variable name="collection" isIdentifier="true">
				<Default>collection</Default>
				<_ToolTip>Collection to iterate through</_ToolTip>
				<Function>GetCollections()</Function>
			</Variable>
			<Variable name="varname" isIdentifier="true">
				<Default>varname</Default>
				<_ToolTip>Name of variable.</_ToolTip>
			</Variable>
			<Variable name="countorlength" isEditable="false">
				<Default>Count</Default>
				<Function>GetLengthProperty("collection")</Function>
			</Variable>
			<Variable name="type" isEditable="false">
				<Default>var</Default>
				<Function>GetComponentTypeOf("collection")</Function>
			</Variable>
		</Variables>
		<Code><![CDATA[for (int $i$ = $collection$.$countorlength$ - 1; $i$ >= 0 ; $i$--) {
	$type$ $varname$ = $collection$[$i$];
	$selected$$end$
}]]></Code>
	</CodeTemplate>
	
	<CodeTemplate version="2.0">
		<Header>
			<_Group>C#</_Group>
			<Version>1.0</Version>
			<MimeType>text/x-csharp</MimeType>
			<Shortcut>do</Shortcut>
			<_Description>Template for 'do...while' loop</_Description>
			<TemplateType>SurroundsWith,Expansion</TemplateType>
		</Header>
		<Variables>
			<Variable name="expression">
				<Default>true</Default>
				<_ToolTip>Expression to evaluate</_ToolTip>
			</Variable>
		</Variables>
		<Code><![CDATA[do {
	$selected$$end$
} while ($expression$);]]></Code>
	</CodeTemplate>
	
	<CodeTemplate version="2.0">
		<Header>
			<_Group>C#</_Group>
			<Version>1.0</Version>
			<MimeType>text/x-csharp</MimeType>
			<Shortcut>else</Shortcut>
			<_Description>Template for 'else'</_Description>
			<TemplateType>SurroundsWith,Expansion</TemplateType>
		</Header>
		<Code><![CDATA[else {
	$selected$$end$
}]]></Code>
	</CodeTemplate>

	<CodeTemplate version="2.0">
		<Header>
			<_Group>C#</_Group>
			<Version>1.0</Version>
			<MimeType>text/x-csharp</MimeType>
			<Shortcut>foreach</Shortcut>
			<_Description>Template for 'foreach' loop</_Description>
			<TemplateType>SurroundsWith,Expansion</TemplateType>
		</Header>
		<Variables>
			<Variable name="id" isIdentifier="true">
				<Default>item</Default>
				<_ToolTip>Identifier for the current element</_ToolTip>
			</Variable>
			<Variable name="collection">
				<Default>collection</Default>
				<_ToolTip>Collection to iterate through</_ToolTip>
				<Function>GetCollections()</Function>
			</Variable>
		</Variables>
		<Code><![CDATA[foreach (var $id$ in $collection$) {
	$selected$$end$
}]]></Code>
	</CodeTemplate>
	
	<CodeTemplate version="2.0">
		<Header>
			<_Group>C#</_Group>
			<Version>1.0</Version>
			<MimeType>text/x-csharp</MimeType>
			<Shortcut>if</Shortcut>
			<_Description>Template for 'if' statement</_Description>
			<TemplateType>SurroundsWith,Expansion</TemplateType>
		</Header>
		<Variables>
			<Variable name="expression">
				<Default>true</Default>
				<_ToolTip>Expression to evaluate</_ToolTip>
			</Variable>
		</Variables>
		<Code><![CDATA[if ($expression$) {
	$selected$$end$
}]]></Code>
	</CodeTemplate>

	<CodeTemplate version="2.0">
		<Header>
			<_Group>C#</_Group>
			<Version>1.0</Version>
			<MimeType>text/x-csharp</MimeType>
			<Shortcut>lock</Shortcut>
			<_Description>Template for 'lock' statement</_Description>
			<TemplateType>SurroundsWith,Expansion</TemplateType>
		</Header>
		<Variables>
			<Variable name="expression" isIdentifier="true">
				<Default>this</Default>
				<_ToolTip>Object to lock</_ToolTip>
			</Variable>
		</Variables>
		<Code><![CDATA[lock ($expression$) {
	$selected$$end$
}]]></Code>
	</CodeTemplate>
	
	<CodeTemplate version="2.0">
		<Header>
			<_Group>C#</_Group>
			<Version>1.0</Version>
			<MimeType>text/x-csharp</MimeType>
			<Shortcut>namespace</Shortcut>
			<_Description>Template for namespace</_Description>
			<TemplateType>SurroundsWith,Expansion</TemplateType>
		</Header>
		<Variables>
			<Variable name="name" isIdentifier="true">
				<Default>MyNamespace</Default>
				<_ToolTip>Namespace name</_ToolTip>
			</Variable>
		</Variables>
		<Code><![CDATA[namespace $name$ {
	$selected$$end$
}]]></Code>
	</CodeTemplate>
	
	<CodeTemplate version="2.0">
		<Header>
			<_Group>C#</_Group>
			<Version>1.0</Version>
			<MimeType>text/x-csharp</MimeType>
			<Shortcut>try</Shortcut>
			<_Description>Template for try...catch</_Description>
			<TemplateType>SurroundsWith,Expansion</TemplateType>
		</Header>
		<Variables>
			<Variable name="SystemException" isEditable="false">
				<Default>System.Exception</Default>
				<Function>GetSimpleTypeName("System#Exception")</Function>
			</Variable>
		</Variables>
		<Code><![CDATA[try {
	$selected$$end$
} catch ($SystemException$ ex) {
	
}]]></Code>
	</CodeTemplate>

	<CodeTemplate version="2.0">
		<Header>
			<_Group>C#</_Group>
			<Version>1.0</Version>
			<MimeType>text/x-csharp</MimeType>
			<Shortcut>tryf</Shortcut>
			<_Description>Template for try...finally</_Description>
			<TemplateType>SurroundsWith,Expansion</TemplateType>
		</Header>
		<Code><![CDATA[try {
	$selected$
} finally {
	$end$
}]]></Code>
	</CodeTemplate>
	
	<CodeTemplate version="2.0">
		<Header>
			<_Group>C#</_Group>
			<Version>1.0</Version>
			<MimeType>text/x-csharp</MimeType>
			<Shortcut>unchecked</Shortcut>
			<_Description>Template for 'unchecked' block</_Description>
			<TemplateType>SurroundsWith,Expansion</TemplateType>
		</Header>
		<Code><![CDATA[unchecked {
	$selected$$end$
}]]></Code>
	</CodeTemplate>
	
	<CodeTemplate version="2.0">
		<Header>
			<_Group>C#</_Group>
			<Version>1.0</Version>
			<MimeType>text/x-csharp</MimeType>
			<Shortcut>unsafe</Shortcut>
			<_Description>Template for 'unsafe' block</_Description>
			<TemplateType>Expansion, SurroundsWith</TemplateType>
		</Header>
		<Code><![CDATA[unsafe {
	$selected$$end$
}]]></Code>
	</CodeTemplate>
	
	<!-- html -->
	<CodeTemplate version="2.0">
		<Header>
			<_Group>Html</_Group>
			<Version>1.0</Version>
			<MimeType>text/html</MimeType>
			<Shortcut>boldb</Shortcut>
			<_Description>bold block</_Description>
			<TemplateType>Expansion, SurroundsWith</TemplateType>
		</Header>
		<Code><![CDATA[<b>$selected$$end$</b>]]></Code>
	</CodeTemplate>
	
	<CodeTemplate version="2.0">
		<Header>
			<_Group>Html</_Group>
			<Version>1.0</Version>
			<MimeType>text/html</MimeType>
			<Shortcut>commentb</Shortcut>
			<_Description>comment block</_Description>
			<TemplateType>Expansion, SurroundsWith</TemplateType>
		</Header>
		<Code><![CDATA[<!--$selected$$end$-->]]></Code>
	</CodeTemplate>
	
	<CodeTemplate version="2.0">
		<Header>
			<_Group>Html</_Group>
			<Version>1.0</Version>
			<MimeType>text/html</MimeType>
			<Shortcut>heading1b</Shortcut>
			<_Description>heading 1 block</_Description>
			<TemplateType>Expansion, SurroundsWith</TemplateType>
		</Header>
		<Code><![CDATA[<h1>$selected$$end$</h1>]]></Code>
	</CodeTemplate>
	
	<CodeTemplate version="2.0">
		<Header>
			<_Group>Html</_Group>
			<Version>1.0</Version>
			<MimeType>text/html</MimeType>
			<Shortcut>heading2b</Shortcut>
			<_Description>heading 2 block</_Description>
			<TemplateType>Expansion, SurroundsWith</TemplateType>
		</Header>
		<Code><![CDATA[<h2>$selected$$end$</h2>]]></Code>
	</CodeTemplate>
	
	<CodeTemplate version="2.0">
		<Header>
			<_Group>Html</_Group>
			<Version>1.0</Version>
			<MimeType>text/html</MimeType>
			<Shortcut>heading3b</Shortcut>
			<_Description>heading 3 block</_Description>
			<TemplateType>Expansion, SurroundsWith</TemplateType>
		</Header>
		<Code><![CDATA[<h3>$selected$$end$</h3>]]></Code>
	</CodeTemplate>
	
	<CodeTemplate version="2.0">
		<Header>
			<_Group>Html</_Group>
			<Version>1.0</Version>
			<MimeType>text/html</MimeType>
			<Shortcut>heading4b</Shortcut>
			<_Description>heading 4 block</_Description>
			<TemplateType>Expansion, SurroundsWith</TemplateType>
		</Header>
		<Code><![CDATA[<h4>$selected$$end$</h4>]]></Code>
	</CodeTemplate>
	
	<CodeTemplate version="2.0">
		<Header>
			<_Group>Html</_Group>
			<Version>1.0</Version>
			<MimeType>text/html</MimeType>
			<Shortcut>italicb</Shortcut>
			<_Description>italic block</_Description>
			<TemplateType>Expansion, SurroundsWith</TemplateType>
		</Header>
		<Code><![CDATA[<i>$selected$$end$</i>]]></Code>
	</CodeTemplate>
	
	<CodeTemplate version="2.0">
		<Header>
			<_Group>Html</_Group>
			<Version>1.0</Version>
			<MimeType>text/html</MimeType>
			<Shortcut>parab</Shortcut>
			<_Description>paragraph block</_Description>
			<TemplateType>Expansion, SurroundsWith</TemplateType>
		</Header>
		<Code><![CDATA[<p>$selected$$end$</p>]]></Code>
	</CodeTemplate>
	
	<!-- xml -->
	<CodeTemplate version="2.0">
		<Header>
			<_Group>Xml</_Group>
			<Version>1.0</Version>
			<MimeType>application/xml</MimeType>
			<Shortcut>commentb</Shortcut>
			<_Description>Template for comment block</_Description>
			<TemplateType>Expansion, SurroundsWith</TemplateType>
		</Header>
		<Code><![CDATA[<!--$selected$$end$-->]]></Code>
	</CodeTemplate>

	<!-- python -->
	<CodeTemplate version="2.0">
		<Header>
			<_Group>Python</_Group>
			<Version>1.0</Version>
			<MimeType>text/x-python</MimeType>
			<Shortcut>while</Shortcut>
			<_Description>Template for while block</_Description>
			<TemplateType>Expansion</TemplateType>
		</Header>
		<Variables>
			<Variable name="expression">
				<Default>True</Default>
				<_ToolTip>Expression to evaluate</_ToolTip>
			</Variable>
		</Variables>
		<Code><![CDATA[while $expression$:
$selected$$end$]]></Code>
	</CodeTemplate>
	<CodeTemplate version="2.0">
		<Header>
			<_Group>Python</_Group>
			<Version>1.0</Version>
			<MimeType>text/x-python</MimeType>
			<Shortcut>def</Shortcut>
			<_Description>Template for function block</_Description>
			<TemplateType>Expansion</TemplateType>
		</Header>
		<Variables>
			<Variable name="name" isIdentifier="true">
				<Default>name</Default>
				<_ToolTip>Function name</_ToolTip>
			</Variable>
			<Variable name="args">
				<Default>arg1</Default>
				<_ToolTip>Function arguments</_ToolTip>
			</Variable>
		</Variables>
		<Code><![CDATA[def $name$($args$):
$end$]]></Code>
	</CodeTemplate>
	<CodeTemplate version="2.0">
		<Header>
			<_Group>Python</_Group>
			<Version>1.0</Version>
			<MimeType>text/x-python</MimeType>
			<Shortcut>cdef</Shortcut>
			<_Description>Template for class function block</_Description>
			<TemplateType>Expansion</TemplateType>
		</Header>
		<Variables>
			<Variable name="name" isIdentifier="true">
				<Default></Default>
				<_ToolTip>Function name</_ToolTip>
			</Variable>
			<Variable name="args">
				<Default>, arg1</Default>
				<_ToolTip>Function arguments</_ToolTip>
			</Variable>
		</Variables>
		<Code><![CDATA[def $name$(self$args$):
$end$]]></Code>
	</CodeTemplate>
	<CodeTemplate version="2.0">
		<Header>
			<_Group>Python</_Group>
			<Version>1.0</Version>
			<MimeType>text/x-python</MimeType>
			<Shortcut>if</Shortcut>
			<_Description>Template for if block</_Description>
			<TemplateType>Expansion,SurroundsWith</TemplateType>
		</Header>
		<Variables>
			<Variable name="condition">
				<Default>True</Default>
				<_ToolTip>If condition</_ToolTip>
			</Variable>
		</Variables>
		<Code><![CDATA[if $condition$:
$selection$$end$]]></Code>
	</CodeTemplate>
	<CodeTemplate version="2.0">
		<Header>
			<_Group>Python</_Group>
			<Version>1.0</Version>
			<MimeType>text/x-python</MimeType>
			<Shortcut>main</Shortcut>
			<_Description>Template for main block</_Description>
			<TemplateType>Expansion,SurroundsWith</TemplateType>
		</Header>
		<Code><![CDATA[if __name__ == '__main__':
    $selection$$end$]]></Code>
	</CodeTemplate>
	<CodeTemplate version="2.0">
		<Header>
			<_Group>Python</_Group>
			<Version>1.0</Version>
			<MimeType>text/x-python</MimeType>
			<Shortcut>gtkwindow</Shortcut>
			<_Description>Template for a class deriving from gtk.Window</_Description>
			<TemplateType>Expansion,SurroundsWith</TemplateType>
		</Header>
		<Variables>
			<Variable name="name" isIdentifier="true">
				<Default>MyWindow</Default>
				<_ToolTip>Window class name</_ToolTip>
			</Variable>
		</Variables>
		<Code><![CDATA[class $name$(gtk.Window):
    def __init__(self):
        # initialize window
        gtk.Window.__init__(self)
        self.set_title('$name$')
        self.set_default_size(640, 480)

$selection$$end$]]></Code>
	</CodeTemplate>
	<CodeTemplate version="2.0">
		<Header>
			<_Group>Python</_Group>
			<Version>1.0</Version>
			<MimeType>text/x-python</MimeType>
			<Shortcut>gladewindow</Shortcut>
			<_Description>Template for a class loading contents from a gtkbuilder file</_Description>
			<TemplateType>Expansion,SurroundsWith</TemplateType>
		</Header>
		<Variables>
			<Variable name="name" isIdentifier="true">
				<Default>MyWindow</Default>
				<_ToolTip>Window class name</_ToolTip>
			</Variable>
			<Variable name="path">
				<Default>widgets.ui</Default>
				<_ToolTip>Path to ui description file (widgets.ui)</_ToolTip>
			</Variable>
			<Variable name="childname" isIdentifier="true">
				<Default>window_child</Default>
				<_ToolTip>The top-most child of the window within the gtk.Builder file.</_ToolTip>
			</Variable>
		</Variables>
		<Code><![CDATA[class $name$(gtk.Window):
    def __init__(self):
        gtk.Window.__init__(self)
        self._build()
        
    def _build(self):
        # create builder to load widgets
        self._builder = gtk.Builder()
        self._builder.add_from_file('$path$')
        
        # reparent child widget into our window
        child = self._builder.get_object('$childname$')
        parent = child.parent
        child.reparent(self)
        
        # copy settings from original parent window
        self.set_title(parent.get_title() or '$name$')
        self.set_default_size(*parent.get_default_size())
        
        # copy objects from gtkbuilder and attach them
        for obj in self._builder.get_objects():
            if obj.get_name():
                name = '_' + obj.get_name()
                if not hasattr(self, name):
                    setattr(self, name, obj)

$selection$$end$]]></Code>
	</CodeTemplate>
</CodeTemplates>
